package JavaSE.CODE.ClassInCommonUse.PackagingClass;

public class PackUnpack {
    public static void main(String[] args) {
        int num = 10;
        //装箱：基本→引用
        Integer integer1 = new Integer(num);
        Integer integer2 = Integer.valueOf(num);
        //拆箱：引用→基本
        Integer integer3 = new Integer(100);
        int num1 = integer3.intValue();

        //JDK 1.5之后：自动装拆箱
        int age = 30;
        //自动装箱
        Integer integer4 = age;
        //自动拆箱
        int age2 = integer4;



    }
}
